#!/usr/bin/perl -w
use strict;
use warnings;
use DBI;

require('function.pl');


my $db_conn = DBI->connect("DBI:mysql:database=phone_num_search;host=localhost", 'root', '');
$db_conn->do('set names utf8');
#$db_conn->{'mysql_use_result'} = 1;
while (<>) {
	my @arr = split("\t");
	next if (@arr < 3);
	$db_conn->do("delete from result force index(phonenum_rank_index) where phone_num = '$arr[0]' and rank = $arr[1]");
}
